import logging

from logging import handlers
from wass.settings import NOTIFY_LOG_PATH

log_path = NOTIFY_LOG_PATH
format_str = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('notify')

th = handlers.WatchedFileHandler(filename=log_path, encoding='utf-8')
th.setFormatter(format_str)

logger.setLevel(logging.ERROR)
logger.setLevel(logging.INFO)

logger.addHandler(th)
